<template>
<ul class="menu bg-base-200 rounded-box w-56 text-base-content">
  <li><RouterLink to="/index/home">主页</RouterLink></li>
  <li>
    <RouterLink to="/index/score">成绩查询</RouterLink>
  </li>
  <li :class="[{'hidden':useUserStore().user.role!='ADMIN'}]">
    <details open>
      <summary><RouterLink to="/index/user">用户管理</RouterLink></summary>
      <ul>
        <li><RouterLink to="/index/studentManage">学生用户</RouterLink></li>
        <li><RouterLink to="/index/teacherManage">教师用户</RouterLink></li>
        <li :class="[{'hidden':useUserStore().user.role!='ADMIN'}]">
          <RouterLink to="/index/adminManage">管理员用户</RouterLink>
        </li>
      </ul>
    </details>
  </li>
  <li><RouterLink to="/index/userCenter">个人信息</RouterLink></li>
</ul>
</template>

<script setup>

import {useUserStore} from "@/store/userStore.js";
</script>

<style scoped>

</style>